var d=null;

function aa(){
    d = setInterval(function () {
            var number = Math.random();
            var number1 = Math.random();
            number1 = Math.ceil(number1 * 999);
            number = Math.ceil(number * 999);
            document.getElementById("h").value = number;
            document.getElementById("y").value = number1;
        }, 50
    );
}
function bb(){
    clearInterval(d);

    var number=document.getElementById("h").value;
    var number1= document.getElementById("y").value;
    if (number>number1){
        var i=3;
        document.getElementById("p").value=i-1;

    }else if (number<number1){
        var e=number1-number;
        document.getElementById("o").value=e;
    }
}